<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>我购买的商品</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
h1 {
	clear: both;
	margin-left: 460px;
}

table {
	margin: 0px auto;
	width: 1024px;
}

table img {
	width: 100px;
	height: 100px;
	vertical-align: middle;
}

td {
	text-align: center;
}

th {
	line-height: 50px;
	background-color: #A52A2A;
	color: white;
}

#empty {
	margin: 0px 0px 0px 20%;
}

#submit {
	width: 100px;
	height: 40px;
	background-color: #A52A2A;
	border: 0px;
	color: white;
}
;
</style>
<script type="text/javascript" src="${request.Context}/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
	$(document).ready(function(e) {
		$(".del").click(function() {
			return confirm("确定要删除吗？");
		});

	});
</script>

</head>

<body>

	<#include "header.ftl">
	<h1>我购买的商品</h1>
	<hr>
	<form action="/cart/dingdan" method="post">

		<#if list2??>
			<table>
				<tr>
					<th>商品编号</th>
					<th colspan="2">商品名称</th>
					<#--  <th>商品类型</th>-->
					<th>商品单价</th>
					<th>购买数量</th>
					<th>小计</th>
					<th>下单时间</th>
					<th>订单状态</th>
					<th>操作</th>
				</tr>
				
				
				<#list list2 as gw>
					<tr class="td">
						<td>${gw.getGid()}</td>
						<td><img src="${request.Context}/img/detail/${gw.getImg()}" /></td>
						<td>${gw.getName()}</td>
						<#--<td>${gw.getType()}</td>-->
						<td>${gw.getPrice()}</td>
						<td>${gw.getNum()}</td>
						<td>${gw.getPrice()*gw.getNum()}</td>
						<td>${gw.getDateTime()}</td>		
						<td>
						<#if gw.zt == 1>已发货</#if> 
						<#if gw.zt  == 0>未发货</#if>
						<#if gw.zt == 2>已确认收货</#if>
						</td>
						<td><a href="/gw/del?gid=${gw.getGid()}&type=${gw.getType()}" class="del">删除</a>
						<br>
						<#if gw.zt=1>
						<a href="/gw/ys?gid=${gw.getGid()}&type=${gw.getType()}">收货</a></td>
						</#if>
					</tr>
				</#list>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					
				</tr>
			</table>
		<#else>
		
			
			<div id="empty">
				<a href="/" ><img src="${request.Context}/img/che.jpg"></a>
			</div>
		</#if>
		
	</form>
	<div style="height: 190px"></div>

	<#include "footer.ftl">

</body>
</html>
